import 'package:flutter/material.dart';

// icons 的使用，需要在iconfont中先下载图标代码，之后根目录下创建文件夹，修改pubspec.yaml文件，配置图标位置
// fonts:
//   - family: mySelfIcon # 定义字体名称
//     fonts:
//       - asset: font/iconfont.ttf

// 定义类的静态属性，可以不初始化，通过类名字直接访问
// 复制iconfont.json文件中对应图标的unicode字段，并在前面拼接0x表16进制
class MyIcon {
  static const IconData tuBook =
      IconData(0xf00a1, fontFamily: 'mySelfIcon', matchTextDirection: true);

  static const IconData book =
      IconData(0xf0027, fontFamily: 'mySelfIcon', matchTextDirection: true);
  static const IconData cartAll =
      IconData(0xf0178, fontFamily: 'mySelf1Icon', matchTextDirection: true);
  static const IconData cart =
      IconData(0xe664, fontFamily: 'mySelf1Icon', matchTextDirection: true);
}
